package com.xsjl.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xsjl.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * user数据访问接口
 * @author Administrator
 *
 */
@Mapper
// @Repository
public interface UserMapper extends BaseMapper<User> {

	/**
	 * 更新粉丝数
	 * @param userid
	 * @param count
	 */

	@Update(value = "update tb_user set fanscount = fanscount + #{count} where id = #{userid}")
	void updateFanCount(String userid, int count);

	/**
	 * 更新关注数
	 * @param userid
	 * @param count
	 */
	@Update(value = "update tb_user set followcount = followcount + #{count} where id = #{userid}")
	void updateFollowCount(String userid, int count);
}
